html, body {
	margin: 0;
	padding: 0;
	font-family: "Inter", "Helvetica Neue", Helvetica, Arial, sans-serif;
	color: #1F2937;
	background-color: #FFFFFF;
	height: 100%;
	overflow: auto;
	transition: background-color 0.3s ease, color 0.3s ease;
}

textarea {
	font-family: Menlo, Monaco, Consolas, "Courier New", monospace;
	font-size: 12px;
	resize: none;
}

header {
	padding: 16px 24px;
	display: flex;
	align-items: center;
	height: 68px;
	box-sizing: border-box;
	border-bottom: 1px solid #E5E7EB;
	gap: 16px;
}

header .logo-link {
	display: flex;
	align-items: center;
}

header h1 {
	margin: 0;
	font-size: 24px;
	font-weight: 700;
	color: inherit;
}

.other-demos {
	margin-left: auto;
	display: flex;
	align-items: center;
	gap: 8px;
	font-size: 14px;
}

.other-demos a {
	color: #6B7280;
	text-decoration: none;
	transition: color 0.2s ease;
}

.other-demos a:hover {
	color: #3B82F6;
}

.other-demos .separator {
	color: #9CA3AF;
}

.theme-toggle {
	margin-left: 16px;
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 8px 16px;
	border: none;
	border-radius: 8px;
	background-color: transparent;
	color: #6B7280;
	cursor: pointer;
	font-family: inherit;
	font-size: 14px;
	font-weight: 500;
	transition: background-color 0.2s ease, color 0.2s ease;
}

.theme-toggle:hover {
	background-color: #F3F4F6;
	color: #1F2937;
}

.theme-toggle .material-icons {
	font-size: 20px;
}

.theme-toggle .dark-icon,
.theme-toggle .dark-text {
	display: none;
}

body.dark .theme-toggle .light-icon,
body.dark .theme-toggle .light-text {
	display: none;
}

body.dark .theme-toggle .dark-icon,
body.dark .theme-toggle .dark-text {
	display: inline;
}

.containers {
	display: flex;
	height: calc(100vh - 68px);
	gap: 12px;
	padding: 12px;
	box-sizing: border-box;
}

.container {
	flex-basis: 50%;
	display: flex;
	flex-direction: column;
	height: 100%;
	box-sizing: border-box;
}

.label {
	padding: 8px 12px;
	background-color: #F3F4F6;
	border: 1px solid #E5E7EB;
	border-radius: 8px 8px 0 0;
	font-size: 14px;
	font-weight: 500;
	display: flex;
	align-items: center;
	gap: 8px;
}

.label select,
.label button {
	padding: 4px 8px;
	border-radius: 4px;
	border: 1px solid #D1D5DB;
	background-color: #FFFFFF;
	font-size: 13px;
	cursor: pointer;
	transition: border-color 0.2s ease;
}

.label select:hover,
.label button:hover {
	border-color: #3B82F6;
}

.label a {
	color: #3B82F6;
	text-decoration: none;
}

.label a:hover {
	text-decoration: underline;
}

.pane, .inputPane {
	padding: 12px;
	border: 1px solid #E5E7EB;
	border-top: none;
	border-radius: 0 0 8px 8px;
	overflow: auto;
	flex-grow: 1;
	flex-shrink: 1;
	background-color: #FFFFFF;
	color: #1F2937;
	transition: background-color 0.3s ease, border-color 0.3s ease;
}

#preview {
	display: flex;
}

#preview iframe {
	flex-grow: 1;
	border-radius: 0 0 8px 8px;
}

#main {
	display: none;
}

#loading {
	display: flex;
	align-items: center;
	justify-content: center;
	height: 100vh;
	font-size: 18px;
	color: #6B7280;
}

.error {
	border-color: #EF4444 !important;
	background-color: #FEF2F2 !important;
}

.loadingError {
	background-color: #FEF2F2;
	font-weight: 600;
	color: #DC2626;
	text-align: center;
	padding: 16px;
	border-radius: 8px;
	margin: 20px;
}

#responseTime {
	display: inline-block;
	font-weight: 600;
	color: #3B82F6;
}

/* Dark mode styles */
body.dark {
	color: #F9FAFB;
	background-color: #111827;
}

body.dark header {
	border-bottom-color: #374151;
}

body.dark .other-demos a {
	color: #9CA3AF;
}

body.dark .other-demos a:hover {
	color: #3B82F6;
}

body.dark .other-demos .separator {
	color: #6B7280;
}

body.dark .theme-toggle {
	color: #9CA3AF;
}

body.dark .theme-toggle:hover {
	background-color: #1F2937;
	color: #F9FAFB;
}

body.dark .label {
	background-color: #1F2937;
	border-color: #374151;
	color: #F9FAFB;
}

body.dark .label select,
body.dark .label button {
	background-color: #111827;
	color: #F9FAFB;
	border-color: #374151;
}

body.dark .label select:hover,
body.dark .label button:hover {
	border-color: #3B82F6;
}

body.dark .pane,
body.dark .inputPane {
	background-color: #1F2937;
	border-color: #374151;
	color: #F9FAFB;
}

body.dark .error {
	background-color: #2c1d1d !important;
	border-color: #F87171 !important;
	color: #FCA5A5;
}

body.dark .loadingError {
	background-color: #2c1d1d;
	color: #FCA5A5;
}

body.dark #loading {
	color: #9CA3AF;
}
